# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgepub
pkgver=0.6
pkgrel=1
pkgdesc="Simple library to read epub files using glib"
url="https://gitlab.gnome.org/GNOME/libgepub"
arch=(x86_64)
license=(LGPL)
depends=(webkit2gtk libarchive)
makedepends=(git gtk-doc gobject-introspection meson)
_commit=59067dedefda23f9a7297ae147c8c02c56338144  # tags/0.6^0
source=("git+https://gitlab.gnome.org/GNOME/libgepub.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  cd build
  meson test
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}
